
<#include "/common/head.html"/>

 <div class="easyui-panel addPage" data-options="fit:true,border:false,novalidate:true">
    <form class="easyui-form" id="ff" method="post" data-options="novalidate:true">
        <table class="table1">
        	
            <tr>
           		<th><span>托盘编号（#）：</span></th>
               	<td colspan="4">
               		<input class="easyui-textbox" type="text" name="tp_no" value="" data-options=""></input>
           		</td>
           	</tr>
           		<!--<tr>
           		<th><span>物料编号：</span></th>
               	<td>
               		<input class="easyui-textbox" type="text" name="mat_no" value="" data-options=""></input>
           		</td>
            </tr>
            <tr>
           		<th><span>物料名称：</span></th>
               	<td>
               		<input class="easyui-textbox" type="text" name="mat_name" value="" data-options=""></input>
           		</td>
           		<th><span>物料数量：</span></th>
               	<td>
               		<input class="easyui-textbox" type="text" name="mat_num" value="" data-options="required:true"></input>
           		</td>
            </tr>
            <tr>
           		<th><span>生产日期：</span></th>
               	<td>
               		<input class="easyui-datetimebox" type="text" name="pro_date" value="" data-options="required:true"></input>
           		</td>
           		<th><span>存入时间：</span></th>
               	<td>
               		<input class="easyui-datetimebox" type="text" name="in_time" value="" data-options="required:true"></input>
           		</td>
            </tr>
            <tr>
           		<th><span>离库时间：</span></th>
               	<td>
               		<input class="easyui-datetimebox" type="text" name="out_time" value="" data-options=""></input>
           		</td>
           		<th><span>操作人员：</span></th>
               	<td>
               		<input class="easyui-textbox" type="text" name="create_user" value="${session['sysUser'].user_name}" data-options=""></input>
           		</td>
            </tr>-->
            <tr>
           		<th><span>所属库位：</span></th>
               	<td>
               		<input class="easyui-combobox" name="of_loc" value="${loc_id!}" data-options="
	            				valueField: 'id',
   								textField: 'text',
	            				data: [
	            					{id:'', text:''}<#list dictDataLoc_id.keySet() as key>,{id:'${key}', text:'${dictDataLoc_id.get(key)}'}</#list>
	            				],
	            				readonly:true
	            				
	            	" />     
           		</td>    
           		<th><span>所属仓库：</span></th>
               	<td>
               		<span class="valueSpan">${storage_name!''}</span>
           		</td>      		
            </tr>
        </table>
    </form>
</div>
<script>
top.window.subPage.save = save;
//$(":input[name='of_loc']").val("${loc_id!}");
function save() {
	if($("#ff").form('enableValidation').form('validate')) {
		$.post("add", getParam(), function(data) {
			top.window.closeWindow();
			top.window.subPage.loadCurrDatagrid();
		});
	}
}
function getParam() {
	var param = {
	     
       	    "model.tp_no": $(":input[name='tp_no']").val(), 
       	    /* "model.mat_no": $(":input[name='mat_no']").val(), 
       	    "model.mat_name": $(":input[name='mat_name']").val(), 
       	    "model.mat_num": $(":input[name='mat_num']").val(), 
       	    "model.pro_date": $(":input[name='pro_date']").val(), 
       	    "model.in_time": $(":input[name='in_time']").val(), 
       	    "model.out_time": $(":input[name='out_time']").val(), 
       	    "model.create_user": $(":input[name='create_user']").val() , */
       	    "model.of_loc": $(":input[name='of_loc']").val(), 
       	    /* "model.of_storage": $(":input[name='of_storage']").val(),  */
	}
	for(key in param) {
		if(!param[key]) {
			delete param[key];
		}
	}
	return param;
}

//扩展js
</script>
<#include "/common/foot.html"/>
